#ifndef SYSTEMTRAY_H
#define SYSTEMTRAY_H

#include <QObject>
#include <QApplication>
#include <QSystemTrayIcon>
#include <QMenu>
#include <QAction>
#include <QDebug>
#include "localconfig.h"

class SystemTray : public QObject
{
    Q_OBJECT
public:
    explicit SystemTray(QObject *parent = nullptr);
    LocalConfig localConfig;//实例化LocalConfig
    Q_INVOKABLE bool setUserPhoto(int);//设置用户图标

private slots:
    void onTrayIconActivated(QSystemTrayIcon::ActivationReason);//槽函数托盘图标被点击
    void onTOffClipboardActionActivated();
    void onNewStickyNoteActivated();
    void onOpenStickyNoteWallActivated();
    void onWarnCheckActivated();
    void onSearchPartnerActivated();

private:
    QSystemTrayIcon *trayIcon;//定义托盘图标变量

signals:
    void iconClicked();//信号图标被点击
    void iconDoubleClicked();//信号图标被点击
    void tOffClipboardClicked();//退出剪切板被点击
    void newStickyNoteClicked();//新建便签纸被点击
    void openStickyNoteWallClicked();//打开便签墙被点击
    void warnCheckClicked();//打开便签墙被点击
    void searchPartnerClicked();//打开便签墙被点击

};

#endif // SYSTEMTRAY_H
